/*
 *  This file is part of LifeBudget - Copyright 2010 Clifton Eaton
 *  ------------------------------------------------------------------
 *  LifeBudget is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  LifeBudget is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with LifeBudget.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.lifebudget.app.client.mvc.model;

import com.extjs.gxt.ui.client.data.BeanModel;
import com.extjs.gxt.ui.client.data.BeanModelFactory;
import com.extjs.gxt.ui.client.data.BeanModelLookup;

/**
 * Convenience class to provide the GXT BeanModelFactory methods needed by the
 * views that load {@link BeanModel} objects into stores.
 */
public class BMF {
	
	/** The Constant CATEGORY_MODEL_FACTORY. */
	private static final BeanModelFactory CATEGORY_MODEL_FACTORY = BeanModelLookup.get().getFactory(Category.class);
	
	/** The Constant CATEGORY_AMOUNT_MODEL_FACTORY. */
	private static final BeanModelFactory CATEGORY_AMOUNT_MODEL_FACTORY = BeanModelLookup.get().getFactory(CategoryAmount.class);
	
	/** The Constant TRANSACTION_MODEL_FACTORY. */
	private static final BeanModelFactory TRANSACTION_MODEL_FACTORY = BeanModelLookup.get().getFactory(Transaction.class);
	
	/**
	 * Gets the category factory.
	 *
	 * @return the category factory
	 */
	public static BeanModelFactory getCategoryFactory(){
		return CATEGORY_MODEL_FACTORY;
	}
	
	/**
	 * Gets the category amount factory.
	 *
	 * @return the category amount factory
	 */
	public static BeanModelFactory getCategoryAmountFactory(){
		return CATEGORY_AMOUNT_MODEL_FACTORY;
	}
	
	/**
	 * Gets the transaction factory.
	 *
	 * @return the transaction factory
	 */
	public static BeanModelFactory getTransactionFactory(){
		return TRANSACTION_MODEL_FACTORY;
	}
}
